{include file="member.header.html"}
{include file="title.html"}
<ul class="order_ul">
        <a href="{url index.php?app=buyer_order}" ><li class="{if $curtype eq 'all_orders'}active{/if}">{$lang.all}</li></a>
            <a href="{url index.php?order_sn=&type=pending&app=buyer_order&act=index}"><li class="{if $curtype eq 'pending'}active{/if}">{$lang.pending_orders}</li></a>
            <a href="{url index.php?order_sn=&type=submitted&app=buyer_order&act=index}"><li class="{if $curtype eq 'submitted'}active{/if}">{$lang.submitted_orders}</li></a>
            <a href="{url index.php?order_sn=&type=accepted&app=buyer_order&act=index}"><li class="{if $curtype eq 'accepted'}active{/if}">{$lang.accepted_orders}</li></a>
            <a href="{url index.php?order_sn=&type=shipped&app=buyer_order&act=index}"><li class="{if $curtype eq 'shipped'}active{/if}">{$lang.shipped_orders}</li></a>
            <a href="{url index.php?order_sn=&type=finished&app=buyer_order&act=index}"><li class="{if $curtype eq 'finished'}active{/if}">{$lang.finished_orders}</li></a>
            <a href="{url index.php?order_sn=&type=canceled&app=buyer_order&act=index}"><li class="{if $curtype eq 'canceled'}active{/if}">{$lang.canceled_orders}</li></a>
</ul>

<form method="get">
    <ul class="form_content">
        <li>
            <input type="text" name="order_sn" value="{$query.order_sn|escape}" placeholder="{$lang.order_sn}">
        </li>
        <li>
                <select name="type">
                    {html_options options=$types selected=$type}
                </select>
        </li>
        <li style="margin-bottom:10px;">
            <input type="hidden" name="app" value="buyer_order" />
            <input type="hidden" name="act" value="index" />
            <input type="submit" class="red_btn" value="{$lang.soso}" />
        </li>
        <!--{if $query.seller_name or $query.add_time_from or $query.add_time_to or $query.order_sn}-->
        <li>
            <a class="white_btn" href="{url app=buyer_order}">{$lang.cancel_query}</a>
        </li>
        <!--{/if}-->
    </ul>
</form>

<!------------订单页--------------------------->
<div class="u_order">
    <!--{foreach from=$orders item=order}-->
    <div class="orderbox">
        <h2><span>{$order.seller_name|escape}</span><b><font style="color:#b20005;">{$order.status|modifier:order_status}<!--{if $order.evaluation_status}-->,&nbsp;{$lang.already_evaluate}<!--{/if}--></font></b></h2>

        <!--{foreach from=$order.order_goods item=goods}-->
        <div class="detail">
            <a href="{url app=goods&id=$goods.goods_id}"> <img src="{$site_url}/{$goods.goods_image}" /></a>
            <p class="title">{$goods.goods_name|escape}</p>
            <p>​{$goods.specification}​</p>​
            <p><strong>{$goods.price|price}</strong><span>{$lang.quantity}：{$goods.quantity}</span></p>
            <p>
                <!--{if $goods.status eq 'SUCCESS'}-->
                            <a href="{url app=buyer_order&act=view&order_id=$goods.order_id}" class="gray">{$lang.has_confirm}</a>
                            <!--{elseif $goods.refund_status eq 'SUCCESS'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}">{$lang.refund_succed}</a>
                            <!--{elseif $goods.refund_status eq 'CLOSED'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}" class="gray">{$lang.refund_colse}</a>
                            <!--{elseif $goods.refund_status eq 'FAILED'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}" style="color:#ff6600">{$lang.refund_fail}</a>
							<!--{elseif $goods.refund_status eq 'WAIT_SELLER_AGREE'}-->
                            <a href="{url app=refund&act=view&refund_id=$goods.refund_id}">{$lang.refund}</a>
                            <!--{elseif $goods.refund_status eq 'ADD'}-->
                            <a href="{url app=refund&act=add&order_id=$order.order_id&goods_id=$goods.goods_id&spec_id=$goods.spec_id}">{$lang.Application_refund}</a>
                            <!--{/if}-->
                <a href="{url app=customer_message&type=3&goods_id=$goods.goods_id}">{$lang.Complaints_goods}</a>
            </p>
        </div>
        <!--{/foreach}-->
        
        
        <!--{if $order.status eq ORDER_SHIPPED && $order.payment_code neq 'cod' && $order.payment_code neq 'bank' && $order.payment_code neq 'post'}-->
        <div class="detail">
            <span style="padding-right:10px;">{$order.auto_finished_time|date:Y-m-d H:i:s}</span>{$lang.auto_take}
        </div>
        <!--{/if}-->
        <p class="opr">
            <a class="white_btn" href="{url app=buyer_order&act=evaluate&order_id=$order.order_id}" id="order{$order.order_id}_evaluate"{if $order.status neq ORDER_FINISHED or $order.evaluation_status neq 0} style="display:none"{/if}>{$lang.evaluate}</a>
            <a href="{url app=cashier&order_id=$order.order_id}"  id="order{$order.order_id}_action_pay"{if $order.status neq ORDER_PENDING} style="display:none"{/if} class="white_btn">{$lang.pay}</a>
            <input type="button" value="{$lang.confirm_order}" class="white_btn" ectype="dialog" dialog_id="buyer_order_confirm_order" dialog_width="100%" dialog_title="{$lang.confirm_order}" uri="index.php?app=buyer_order&amp;act=confirm_order&order_id={$order.order_id}&ajax"  id="order{$order.order_id}_action_confirm"{if $order.status neq ORDER_SHIPPED or $order.payment_code eq 'cod'} style="display:none"{/if} />
            <!--{if $enable_express}-->
            <a target="_blank" class="white_btn"  href="http://m.kuaidi100.com/index_all.html?type={$order.express_company}&postid={$order.invoice_no}&callbackurl={$site_url}/mobile/index.php?app=seller_order" {if $order.status neq ORDER_SHIPPED && $order.status neq ORDER_FINISHED} style="display:none"{/if}>{$lang.view_delivery_track}</a>
            <!--{/if}-->
            <input type="button" value="{$lang.cancel_order}" class="white_btn" ectype="dialog" dialog_width="100%" dialog_title="{$lang.cancel_order}" dialog_id="buyer_order_cancel_order" uri="index.php?app=buyer_order&amp;act=cancel_order&order_id={$order.order_id}&ajax"  id="order{$order.order_id}_action_cancel"{if $order.status neq ORDER_PENDING and $order.status neq ORDER_SUBMITTED} style="display:none"{/if} />
            <a href="{url app=buyer_order&act=view&order_id=$order.order_id}"  class="white_btn">{$lang.view_order}</a>
            <a href="{url app=buyer_order&act=change_payment&order_id=$order.order_id}" target="_blank" <!--{if $order.status neq ORDER_PENDING}--> style="display:none"<!--{/if}--> class="white_btn">{$lang.change_pay}</a>
            <!--{if $order.status eq ORDER_SHIPPED && $order.payment_code neq 'cod' && $order.payment_code neq 'bank' && $order.payment_code neq 'post'}-->
            <a href="{url app=buyer_order&act=delay_auto_finished_time&order_id=$order.order_id}"  class="white_btn">{$lang.extend_take_delivery_three_days}</a>
            <!--{/if}-->
        </p>
    </div>
    <!--{foreachelse}-->
    <div class="null">
        <p>{$lang.no_records}~</p>
    </div>
    <!--{/foreach}-->
</div>
<script>
    $(function(){
        $("img").each(function(){
            var temp_spec=$(this).attr('src');
            if(temp_spec.indexOf('/goodsspec/')>-1){
                var my_site=SITE_URL;
                $(this).attr('src',my_site.replace('/mobile','/')+temp_spec);
                $(this).css('width','24px');
                $(this).css('height','24px');
            }
        })
    })
</script>
{include file=member.page.bottom.html}

<iframe id='iframe_post' name="iframe_post" src="about:blank" frameborder="0" width="0" height="0"></iframe>
{include file="footer.html"}